package com.common.command.handler;

public class DeepPineDataUploadHandler extends DataUploadHandler {

    @Override
    public void bodyHandler(byte[] message) {

    }

    @Override
    public byte[] returnMessage(String returnMessage,byte commandType) {
        byte[] resultArray = new byte[7];
        resultArray[0] = (byte)'$';
        byte[] tempArray = returnMessage.getBytes();
        if(tempArray != null && tempArray.length == 4){
            for (int i = 0; i < tempArray.length; i++) {
                if(1+i<= resultArray.length) {
                    resultArray[i + 1] = tempArray[i];
                }
            }
            resultArray[5] = commandType;

        }
        return resultArray;
    }


}
